Modern computer programs are predominantly programmed in such a way that they are useable in as broad a range of application as possible. The range of application is determined on one hand by the functionalities made available, which in turn should cover as many user desires as possible, and on the other hand by the underlying hardware on which the computer program is to run. In this context, the underlying hardware denotes different computer systems which are used in different areas, are constructed of different components (e.g., processors or bus systems), and/or have different peripherals.
Different functionalities can result from different conditions of the underlying hardware or from different user desires. Adaptation, and therefore specialization, of a computer program to underlying hardware and to specific user desires includes a so-called configuration of the computer program.
For example, a configuration includes the activation or deactivation of individual functions of the computer program, the setting of starting values for certain variables or the preselecting and specifying of certain variable types.
It is well-known to declare the variables and functions used in a computer program in a so-called header file, and to configure the computer program by changing individual variables or function designators in the header file. For example, it is possible to assign a special function to a function designator used in the computer program and declared in the header file, depending upon a specific configuration.
Computer programs are usually created in a so-called high-level programming language, e.g., C, C++, Scheme or JAVA. A computer program created in a high-level programming language is usually referred to as source code. To permit execution of such a computer program on a computer, a so-called machine code must be generated from the source code, the machine code containing instructions which are executable by the processor of the computer. Machine code can be generated by so-called interpretation or compilation of the source code.
Typically, a computer program includes a plurality of functional units. The source code of one or more functional units is stored in a data file. A header file is assigned to one or more such data files. Thus, a computer program is typically made up of a plurality of data files. A configuration of such a computer program, which is accomplished by changes within individual header files, is therefore very unclear and can often only be accomplished by the creator of the source code. In addition, a documentation must be created for all header files, which is very painstaking; even the documentation is for the most part very unclear.
To configure a computer program, it is also known to assign it a special functional unit by which it is possible to configure the entire computer program, e.g., by altering the values of predefined parameters. For example, the functional unit may be launched from within the computer program running, and be executed for configuring the computer program. However, such a functional unit provided for configuring, the computer program only allows a configuration within predefined range limits. A configuration of the computer program, e.g., for adapting the computer program to new hardware or for adapting the computer program to new desires of the user is not possible using such a functional unit. Moreover, the functional unit used for the configuration must be developed specially for the computer program in question, and cannot be used for other computer programs.
Therefore, the object of the present invention is to provide a possibility that allows as clear and flexible a computer-program configuration as possible.
The objective is achieved by a method of the type indicated at the outset, which includes the following steps:                creation of at least one implementation-independent configuration data file and/or alteration of information filed in the at least one implementation-independent configuration data file;        automatic set-up and/or automatic update of configuration data, stored in a configuration data container, as a function of the information filed in the at least one implementation-independent configuration data file;        automatic generation of at least one implementation-dependent configuration data file as a function of the configuration data stored in the configuration data container;        automatic configuration of the at least one functional unit as a function of information filed in the at least one implementation-dependent configuration data file.        
Thus, the data determining a configuration is filed independently of an intended, specific implementation, in one or more implementation-independent configuration data files. In particular, the implementation independence of this configuration data file permits an abstract description of the filed information. This makes it possible to file the information relevant for the configuration of the computer program so that it is particularly easy to read, and therefore to markedly simplify the configuration. Because this configuration data file is implementation-independent, it is possible in particular to configure the computer program in a simple manner so that, for instance, the computer program is executable on a new computer system whose exact parameters were not even known yet when the computer program was created.
The configuration data container makes it possible to centrally provide all data relevant for a configuration. At least one implementation-dependent configuration data file is generated automatically with the aid of the configuration data stored in the configuration data container. In the implementation-dependent configuration data file, individual or a plurality of parameter values are put into concrete terms relative to the implementation-independent configuration data file. In such a concretization, for example, relative values are replaced by absolute values. Specific data types or structures may be assigned to individual values or data areas, as well. Consequently, the implementation-dependent configuration data file takes into account implementation-dependent properties, such as one or more programming languages used when programming the source code, or properties of the hardware on which the computer program is intended to run.
The set-up or the updating of the configuration data container with the aid of the information filed in the implementation-independent configuration data files may be carried out using so-called scripts, for example. In this context, a script denotes a sequence of instructions which are executable by a special computer program. Such special computer programs are AWK or Perl, for example. These special computer programs may also be used to generate implementation-dependent configuration data files from the configuration data stored in the configuration data container.
An essential part of the invention is thus the recognition that the configuration of a computer program may be improved decisively by providing between a user (configurator) and the computer program, an abstract description of the configuration to be implemented in the implementation-independent configuration data file, which is taken as the basis of the configuration. With the aid of the implementation-independent configuration data file, an implementation-dependent configuration data file is automatically created which is then utilized for configuring the computer program. The method of the present invention thus makes it possible to specify the information describing a configuration in an abstract and therefore particularly easily readable manner. Moreover, especially high flexibility is achieved due to the independence of any implementation details.
In one advantageous further development of the method, at least one item of dependency information, which describes a dependency on at least two configuration data present in the configuration data container, is automatically generated. The at least one implementation-dependent configuration data file is generated as a function of the at least one item of dependency information.
Dependency information may describe, for example, whether the change of one configuration parameter has an effect on another configuration parameter. For instance, if a resource is reserved exclusively for one functional unit, then it is not available to other functional units during the execution of the functional unit. Using dependency information, it is possible to ascertain which functional units need a specific resource, and therefore cannot run simultaneously. Consequently, dependency information may also be used for resource management.
In one preferred specific embodiment of the method, a plurality of implementation-independent configuration data files is created, and each of the implementation-independent configuration data files is assigned to at least one functional unit. This allows a particularly simple configuration, because the configuration parameters filed as information in the implementation-independent configuration data files can be found and altered especially easily. For example, it is possible to sort the information determining a configuration, thus, the configuration parameters, according to the functionality influenced by it, or according to hardware. Moreover, a particularly simple adaptation of the implementation-independent configuration data files to newly added functional units is thereby made possible. In the simplest case, a special implementation-independent configuration data file is assigned to a newly added functional unit.
A plurality of implementation-dependent configuration data files is advantageously generated, and each of the implementation-dependent configuration data files is allocated to at least one functional unit. Such a structuring of the implementation-dependent configuration data files increases the clarity of the implementation-dependent configuration data files generated. If the source code is structured in such a way that one or more functional units are located in different data files, then an implementation-dependent configuration data file can be allocated to each of the data files of the source code. A particularly lucid structuring may also be achieved by, in each case, assigning one implementation-dependent configuration data file to each implementation-independent configuration data file.
The at least one implementation-dependent configuration data file is preferably generated as a function of at least one property of hardware on which an installation of at least one portion of the configured computer program is to be made possible. For instance, such a hardware property may be the number of processors available or the type and number of sensors connected to the hardware. If such hardware properties are taken into account when generating the implementation-dependent configuration data files, an especially precise configuration of the computer program is then possible. Particularly using dependency information, it is therefore possible, for instance, to automatically create a configuration optimized with regard to execution speed.
In one preferred specific embodiment, the at least one implementation-dependent configuration data file is generated as a function of the result of a plausibility check. For example, a plausibility check may include a check as to whether a resource needed by a functional unit is available at all.
The at least one hardware property is preferably used to carry out the plausibility check. It is thereby possible to greatly increase the degree of automation, and to achieve a reliable configuration of the computer program. For example, if a functional unit provides for an acquisition of measured values, it may be checked whether suitable sensors are present and whether they make available the measuring accuracy demanded. In this case, it is conceivable, for instance, that the sensor is configured automatically.
In a further preferred specific embodiment, a documentation is created automatically. The documentation describes the information filed within the at least one implementation-independent configuration data file and/or the at least one implementation-dependent configuration data file. On one hand, documentations automatically generated in this way increase the maintainability of the computer program, and on the other hand, permit especially easy comprehension of an accomplished configuration. The automatic generation of the documentation ensures that it conforms with the actual configuration. If a new configuration of the computer program is to be carried out, then with the aid of such a documentation, it is possible to determine particularly easily which parameter values must be changed.
Preferably, the at least one implementation-independent configuration data file is created in an XML-based format. XML (Extensible Markup Language) is a standardized meta language which makes it possible to generate structured languages. If the at least one implementation-independent configuration data file is created in an XML-compliant, structured language, then a configuration is facilitated, because such an implementation-independent configuration data file can be read particularly well. Moreover, a configuration data file of this kind can also be read especially well by machine. In particular, a plurality of software tools exists, likewise standardized in part, by which it is possible to edit and process data files created in an XML-based format.
In one preferred specific embodiment of the method, as a function of the configuration data, it is automatically determined whether a functional unit included by the computer program is needed by the computer program, and this functional unit is configured only if the functional unit is needed by the computer program. This facilitates an especially rapid configuration, because only those functional units are actually configured which are really needed in an execution of the configured computer program. Furthermore, the configured computer program thereby takes up as little storage space as possible, since, for example, a translation of source code into machine code is only brought about for those functional units which are actually intended to be used.